package com.hu.bgp.framework.linker;

import com.google.gwt.core.ext.LinkerContext;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.linker.LinkerOrder;
import com.google.gwt.core.ext.linker.LinkerOrder.Order;
import com.google.gwt.core.linker.XSLinker;

@LinkerOrder(Order.PRIMARY)
public class BgpGameLinker extends XSLinker
{
	public String getDescription()
	{
		return "My BGP Linker";
	}

	protected String getCompilationExtension(TreeLogger logger, LinkerContext context) throws UnableToCompleteException
	{
		return ".cache.js";
	}

	protected String getModuleSuffix(TreeLogger logger, LinkerContext context) throws UnableToCompleteException
	{
		return "if($bgpGameLinker.load)$bgpGameLinker.load.onScriptLoad(gwtOnLoad);})();";
	}

	protected String getSelectionScriptTemplate(TreeLogger logger, LinkerContext context) throws UnableToCompleteException
	{
		return "com/hu/bgp/framework/linker/BgpSelection.js";
	}
}
